import Vue from 'vue'
import VueRouter from 'vue-router'
import shouye from '../views/shouye.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/shouye',
    name: 'shouye',
    component: shouye,
    children:[
      {
        path: '/shezhi',
        name: 'shezhi',
        component: () => import('../views/er/shezhi.vue')
      },
      {
        path: '/xingxi',
        name: 'xingxi',
        component: () => import('../views/er/xingxi.vue')
      },
      {
        path: '/dongtai',
        name: 'dongtai',
        component: () => import('../views/er/dongtai.vue')
      },
      {
        path: '/tuijian',
        name: 'tuijian',
        component: () => import('../views/er/tuijian.vue')
      },
      {
        path:"/",
        redirect:"/tuijian"
      }
    ]
  },
  {
    path: '/shuyin',
    name: 'shuyin',
    component: () => import('../views/shuyin.vue'),
    children:[
      {
        path: '/dianyin',
        name: 'dianyin',
        component: () => import('../views/er/dianyin.vue')
      },
      {
        path: '/dianshi',
        name: 'dianshi',
        component: () => import('../views/er/dianshi.vue')
      },
      {
        path: '/dushu',
        name: 'dushu',
        component: () => import('../views/er/dushu.vue')
      },
      {
        path: '/yuanshu',
        name: 'yuanshu',
        component: () => import('../views/er/yuanshu.vue')
      },
      {
        path: '/yinlue',
        name: 'yinlue',
        component: () => import('../views/er/yinlue.vue')
      },
      {
        path: '/tongch',
        name: 'tongch',
        component: () => import('../views/er/tongch.vue')
      },
      {
        path:"/",
        redirect:"/dianyin"
      }
    ]
  },
  {
    path: '/xiaozu',
    name: 'xiaozu',
    component: () => import('../views/xiaozu.vue'),
    children:[
      {
        path: '/quanbu',
        name: 'quanbu',
        component: () => import('../views/er/quanbu.vue')
      }
    ]
  },
  {
    path: '/shiji',
    name: 'shiji',
    component: () => import('../views/shiji.vue')
  },
  {
    path: '/wo',
    name: 'wo',
    component: () => import('../views/wo.vue')
  },

  {
    path:"/",
    redirect:"/shouye"
  }
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router
